﻿@model Gman.WebApp.Models.BienModel

@{
    ViewBag.Title = "";
}


<script src="@Url.Content("~/Scripts/Binding/Bien.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/Binding/jquery-asyncUpload-0.1.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/Binding/swfupload.js")" type="text/javascript"></script>

<script type="text/javascript">
    var guid = "@(Model.ID.ToString())";
    var action = "@(Model.Action.ToString())";

    $(document).ready(function () {
        SetupControls();
        SetupActions();
    });

    //$(function () {
        //$("#photo").makeAsyncUploader({
            //upload_url: "/Bien/AsyncUpload",
            //flash_url: '/Scripts/swfupload.swf',
            //button_image_url: '/Content/blankButton.png',
            //disableDuringUpload: 'INPUT[type="submit"]'
        //});
   //});      
     
</script>


<div style="margin-top:5px;">
    <div class="DataTop">
        <div class="DataTopLeft">
        </div>
        <div class="DataTopRight">
        </div>
    </div>
    <div class="DataContent">
        <div class="DataContentRight" style="height:50px;">
             <b> Registro de Activos </b> 
             @{ Html.RenderPartial("ToolBar", Model.ToolBar);}   
             
        </div>
    </div>
    <div class="DataBottom">
        <div class="DataBottomLeft">
        </div>
        <div class="DataBottomRight">
        </div>
    </div>
</div>


<div style="margin-top:5px;">
    <div class="DataTop">
        <div class="DataTopLeft">
        </div>
        <div class="DataTopRight">
        </div>
    </div>
    <div class="DataContent">
        <div class="DataContentRight">
        <div class="DataTable">

        <fieldset>

            <table width="100%">        
                <tr>
                    <td style="width:250px">
                        <div class="editor-label">
                            Codigo de Activo:
                        </div>
                    </td>
                    <td >
                        <div >
                             @(Html.TextBoxFor(model => model.Bien.CodBien, new { style = "width: 90%;", propertyname = "CodBien"}))
                            
                        </div>
                    </td>                
                    <td>
                        <div > 
                            <img id="btnBuscar" src="../../_Images/Search-icon-16.png"  alt="Buscar bien" style="cursor:pointer;"/>
                        </div>
                    </td>             
                </tr>            
                <tr>
                    <td style="width: 250px; height: 23px;">
                        <div class="editor-label">
                            Tipo de Bien:
                        </div>
                    </td>
                    <td style="height: 23px" colspan="2">
                        <div>
                            @(Html.DropDownListFor(model => model.Bien.TipoBien, Model.TipoBien, new { style = "width: 90%;", propertyname = "TipoBien" }))                        
                        </div>
                    </td> 
                    
                    <td>
                        <div >
                            <form enctype="multipart/form-data" method="post" >
                                <input type="file" name="photo" id="photo" />
                                 <input type="submit" value="Save" />
                            </form>
                        </div>  
                    </td>
                                    
                </tr>            
                <tr>
                    <td style="width: 250px">
                        <div class="editor-label">
                            Numero de Serie:
                        </div>
                    </td>
                    
                    <td colspan="2">
                        <div>
                             @(Html.TextBoxFor(model => model.Bien.NroSerieBien, new { style = "width: 90%;", propertyname = "NroSerieBien" }))
                        </div>
                    </td>                
                    <td colspan="5" rowspan="11"  style="width:400px">  
                        <div>
                              
                                <img alt="Preview" src="@( Url.Content(System.Web.Hosting.HostingEnvironment.MapPath("~/App_Data/Files") + @"\" + ViewData["photo_guid"] + ".jpg") )" height="250px" width="250"/>
                                <a  href="@( Url.Content(System.Web.Hosting.HostingEnvironment.MapPath("~/App_Data/Files") + @"\" + ViewData["photo_guid"] + ".jpg") )" target="_blank"/> Ver
                        </div>          
                    </td>                
                </tr>
                
                <tr>
                    <td style="width: 250px" >
                        <div class="editor-label">
                            Descripcion:
                        </div>
                    </td>
                    <td colspan="2">
                        <div>
                             @(Html.TextBoxFor(model => model.Bien.DescBien, new { style = "width: 90%;", propertyname = "DescBien" }))
                        </div>
                    </td>                
                </tr>
                
                <tr>
                    <td style="width: 250px" >
                        <div class="editor-label">
                            Sede/Sucursal/Tienda:
                        </div>
                    </td>                
                    <td colspan="2">
                        <div>
                            @(Html.DropDownListFor(model => model.Bien.IDSede, Model.Sedes, new { style = "width: 90%;", propertyname = "IDSede" }))                        
                        </div>
                    </td>                
                </tr>
                
                <tr>
                    <td style="width: 250px" >
                        <div class="editor-label">
                            Area Asignada:
                        </div>
                    </td>                
                    <td colspan="2">
                        <div>
                            @(Html.DropDownListFor(model => model.Bien.AreaBien, Model.Area, new { style = "width: 90%;", propertyname = "AreaBien" }))                        
                        </div>
                    </td>                
                </tr>
                
                <tr>
                    <td style="width: 250px">
                        <div class="editor-label">
                            Liena o Sistema:
                        </div>
                    </td>
                    
                    <td colspan="2">
                        <div>
                            @(Html.DropDownListFor(model => model.Bien.LineaBien, Model.Linea, new { style = "width: 90%;", propertyname = "LineaBien" }))                        
                        </div>
                    </td>                
                </tr>
                
                <tr>
                    <td style="width: 250px">
                        <div class="editor-label">
                            Garantia:
                        </div>
                    </td>
                    
                    <td colspan="2">
                        <div>
                            @(Html.DropDownListFor(model => model.Bien.GarantiaBien, Model.Garantia, new { style = "width: 90%;", propertyname = "GarantiaBien" }))                        
                        </div>
                    </td>                
                </tr>
                
                <tr>
                    <td style="width: 250px">
                        <div class="editor-label">
                            Contrato:
                        </div>
                    </td>                
                    <td colspan="2">
                        <div>
                            @(Html.DropDownListFor(model => model.Bien.TipoContratoBien, Model.Contrato, new { style = "width: 90%;", propertyname = "TipoContratoBien" }))                        
                        </div>
                    </td>                
                </tr>
                
                <tr>
                    <td style="width: 250px">
                        <div class="editor-label">
                            Proveedor:
                        </div>
                    </td>                
                     <td colspan="2">
                        <div>
                            @(Html.DropDownListFor(model => model.Bien.IDProveedor, Model.Proveedor, new { style = "width: 90%;", propertyname = "IDProveedor" }))                        
                        </div>
                    </td>                                
                </tr>
                
                <tr>
                    <td style="width: 250px"> 
                        <div class="editor-label">
                            Nro Guia de Remision:
                        </div>
                    </td>                
                    <td colspan="2">
                        <div>
                            @(Html.TextBoxFor(model => model.Bien.NroGuiaRemiBien, new { style = "width: 90%;", propertyname = "NroGuiaRemiBien" }))
                        </div>
                    </td>                
                </tr>
                
                <tr>
                    <td style="width: 250px">
                        <div class="editor-label">
                            Vida Util:
                        </div>
                    </td>                
                    <td colspan="2">
                        <div>
                            @(Html.TextBoxFor(model => model.Bien.VidaUtilBien, new { style = "width: 90%;", propertyname = "VidaUtilBien" }))
                        </div>
                    </td>                
                </tr>
                
                <tr>
                    <td style="width: 250px">
                        <div class="editor-label">
                            Fecha Compra:
                        </div>
                    </td>                
                    <td>
                        <div>
                            @(Html.TextBoxFor(model => model.Bien.FecCompBien, new { @class = "date", style = "width: 90%;", propertyname = "FecCompBien" }))
                        </div>
                    </td>                
                    <td style="width: 50px">
                    
                    </td>                
                </tr>
                
                <tr>
                    <td style="width: 250px">
                        <div class="editor-label">
                            Caracteristicas:
                        </div>
                    </td>                
                    <td colspan="5" >
                        <div>
                            @(Html.TextAreaFor(model => model.Bien.CaractBien, new { style = "width: 90%;height:150px", propertyname = "CaractBien" }))
                        </div>
                    </td>                
                </tr>
                
                <tr>
                    <td style="width: 250px">
                        <div class="editor-label">
                            Ficha Tecnica:
                        </div>
                    </td>                
                    <td colspan="5">
                        <div>
                            @(Html.TextAreaFor(model => model.Bien.FichaTecBien, new { style = "width: 90%;height:150px;", propertyname = "FichaTecBien" }))
                        </div>
                    </td>                
                </tr>        
            </table>   
    
        </fieldset>            
    
        </div>
        </div>
    </div>  
    <div class="DataBottom">
        <div class="DataBottomLeft">
        </div>
        <div class="DataBottomRight">
        </div>
    </div>
</div>


